package com.itheima.day13work1;

import java.util.concurrent.ArrayBlockingQueue;

public class Fooder implements Runnable {
   private ArrayBlockingQueue<String> abq;
    public Fooder(ArrayBlockingQueue<String> abq) {
        this.abq=abq;
    }

    @Override
    public void run() {
        while (true){
            try {
                String take = abq.take();
                System.out.println("顾客取餐："+take);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }

        }    }
}
